const validatePass = (rule, value, callback) => {
  if (!value) {
    callback(new Error("手机号码不能为空"));
  } else if (!/^1(3|4|5|6|7|8|9)\d{9}$/.test(value)) {
    callback(new Error("请输入正确的手机号码"));
  } else {
    callback();
  }
};
export const tableOption = {
  border: true,
  // "index": true,
  indexLabel: "序号",
  stripe: true,
  menuAlign: "center",
  align: "center",
  searchMenuSpan: 6,
  dialogEscape: false,
  dialogClickModal: false,
  menuWidth: 160,
  editBtn: false,
  delBtn: false,
  dialogWidth: "30%",
  span: 24,
  columnBtn: false,
  column: [
    {
      type: "input",
      label: "投诉编号",
      addDisplay: false,
      editDisplay: false,
      prop: "controlNo"
    },
    {
      type: "input",
      label: "联系方式",
      search: true,
      prop: "phone",
      rules: [{ validator: validatePass, trigger: "blur" }]
    },
    {
      type: "select",
      dicUrl: "/admin/dict/type/complaint_state",
      search: false,
      addDisplay: false,
      editDisplay: false,
      label: "处理状态",
      prop: "state"
    },
    {
      type: "textarea",
      label: "投诉内容",
      prop: "content",
      overHidden: true
    },
    {
      type: "input",
      hide: true,
      addDisplay: false,
      editDisplay: false,
      label: "逻辑删除标记（0：显示；1：隐藏）",
      prop: "delFlag"
    },
    {
      type: "input",
      label: "创建人",
      addDisplay: false,
      editDisplay: false,
      hide: true,
      prop: "createBy"
    },
    {
      type: "date",
      label: "提交时间",
      addDisplay: false,
      editDisplay: false,
      format: "yyyy-MM-dd",
      valueFormat: "yyyy-MM-dd",
      prop: "createDate"
    },
    {
      type: "input",
      label: "修改建人",
      hide: true,
      addDisplay: false,
      editDisplay: false,
      prop: "updateBy"
    },
    {
      type: "date",
      label: "提交时间",
      addDisplay: false,
      editDisplay: false,
      format: "yyyy-MM-dd",
      valueFormat: "yyyy-MM-dd",
      search: true,
      hide: true,
      prop: "queryDate"
    },
    {
      type: "input",
      label: "租户",
      hide: true,
      addDisplay: false,
      editDisplay: false,
      prop: "tenantId"
    }
  ]
};
